# coding:utf-8
# __ahtu__ = 'Felix'

from selenium import webdriver


class BasePage():
    """
    Page基类
    """

    def __init__(self,driver):
        self.driver =driver
        self.base_url = 'https://www.baidu.com/'
        self.time_out = 5

    def _open(self,url):
        self.driver.get(url)

    def find_element(self, *loc):
        return self.driver.find_element(*loc)

    def input(self, loc, text):
        return self.find_element(*loc).send_keys(text)

    def click(self, loc):
        return self.find_element(*loc).click()
